package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.RxSegment;
import com.ruoyi.system.mapper.RxSegmentMapper;
import com.ruoyi.system.service.IRxSegmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 规律段Service业务层处理
 *
 * @author hjf
 * @date 2025-03-27
 */
@Service
public class RxSegmentServiceImpl implements IRxSegmentService {
    @Autowired
    private RxSegmentMapper rxSegmentMapper;

    /**
     * 查询规律段
     *
     * @param id 规律段主键
     * @return 规律段
     */
    @Override
    public RxSegment selectRxSegmentById(Long id) {
        return rxSegmentMapper.selectRxSegmentById(id);
    }

    /**
     * 查询规律段列表
     *
     * @param rxSegment 规律段
     * @return 规律段
     */
    @Override
    public List<RxSegment> selectRxSegmentList(RxSegment rxSegment) {
        return rxSegmentMapper.selectRxSegmentList(rxSegment);
    }

    /**
     * 新增规律段
     *
     * @param rxSegment 规律段
     * @return 结果
     */
    @Override
    public int insertRxSegment(RxSegment rxSegment) {
        return rxSegmentMapper.insertRxSegment(rxSegment);
    }

    /**
     * 修改规律段
     *
     * @param rxSegment 规律段
     * @return 结果
     */
    @Override
    public int updateRxSegment(RxSegment rxSegment) {
        return rxSegmentMapper.updateRxSegment(rxSegment);
    }

    /**
     * 批量删除规律段
     *
     * @param ids 需要删除的规律段主键
     * @return 结果
     */
    @Override
    public int deleteRxSegmentByIds(Long[] ids) {
        return rxSegmentMapper.deleteRxSegmentByIds(ids);
    }

    /**
     * 删除规律段信息
     *
     * @param id 规律段主键
     * @return 结果
     */
    @Override
    public int deleteRxSegmentById(Long id) {
        return rxSegmentMapper.deleteRxSegmentById(id);
    }
}
